//官网管理-反馈信息
App.util.ns('Admin.Website.WebsiteFb');
App.pages.add((function(){
    var NS = Admin.Website.WebsiteFb;
    var page = new App.Page({
        name: 'website/websiteFb/index'
    });
    //页面初始化
    page.initStack.add('dataTable', function(){
        //面包屑导航
        this.setBreadcrumb([{
            icon: '<i class="fa fa-envelope"></i>',
            content: '官网管理'
        }, {
            content: '反馈信息'
        }]);
        this.dataTable = new App.DataTable({
            baseUrl: '/admin/website/websiteFb',
            dataUrl: 'lists',
            table: {
                id: 'id',
                main: 0,
                columns: App.util.copy(NS.Conf.columns)
            },
            filter: [
                {type: 'keywords'},
                {type: 'timeRange'},
                {type: 'select', name: 'status', title: '状态', width: '120px', items: [
                    [0, '待处理'],
                    [1, '已处理']
                ]}
            ],
            menu: [
                {parent: 'view', permission: 'op:admin.website.websiteFb.detail'},
                {type: 'inline', permission: 'op:admin.website.websiteFb.active', name: '完成',
                    operation: {type: 'change', url: 'active'}, conditions: [['status', '0']]
                },
                {type: 'inline', permission: 'op:admin.website.websiteFb.actived', name: '回滚',
                    operation: {type: 'change', url: 'actived'}, conditions: [['status', '1']]
                },
                {parent: 'drop', permission: 'op:admin.website.websiteFb.delete'},
                {type: 'multi', name: '状态', openable: true, items: [
                    {type: 'multi', permission: 'op:admin.website.websiteFb.multiActive', name: '完成', operation: {type: 'change', url: 'multiActive', confirm: true}},
                    {type: 'multi', permission: 'op:admin.website.websiteFb.multiActived', name: '回滚', operation: {type: 'change', url: 'multiActived', confirm: true}}
                ], permission:[
                    'op:admin.website.websiteFb.multiActive',
                    'op:admin.website.websiteFb.multiActived'
                ]},
                {parent: 'multiDrop', permission: 'op:admin.website.websiteFb.multiDelete'},
                {parent: 'oplog', permission: 'op:admin.website.websiteFb.getOpLogs'}
            ],
            detail: {
                form: {
                    items: App.util.copy(NS.Conf.form)
                }
            }
        }, page);
        this.dataTable.fix(this.contentContainer);
        this.dataTable.loadData();
    });
    //页面刷新
    page.refreshStack.add('dataTable', function(){
        this.dataTable.loadData(true);
    });
    //页面销毁
    page.destroyStack.add('dataTable', function(){
        this.dataTable.destroy();
    });
    return page;
})());